//
//  DetailViewController.h
//  FinAppsParty App
//
//  Created by Ivan Paquico on 11/11/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <QuartzCore/QuartzCore.h>
#import <Mapkit/Mapkit.h>
#import <MapKit/MKAnnotation.h>
#import <MapKit/MKReverseGeocoder.h>

#import "MapViewAnnotation.h"

#import "ViewOcupation.h"

#define METERS_PER_MILE 1609.344


@interface DetailViewController : UIViewController <UISplitViewControllerDelegate, CLLocationManagerDelegate, MKMapViewDelegate, MKReverseGeocoderDelegate, UITextFieldDelegate, UIPickerViewDelegate, UIImagePickerControllerDelegate >{
    
    CLLocationManager *locationManager;
    MKReverseGeocoder *geoCoder;
	MKPlacemark *mPlacemark;

    IBOutlet UITextField *currentAddress;
    IBOutlet UITextField *currentCity;
    IBOutlet UITextField *currentCountry;
    IBOutlet UITextField *currentComunidad;
    IBOutlet UITextField *codigoPostal;
    
    IBOutlet UISwitch *geo;
    
    IBOutlet UIView *Mainview;
    
    IBOutlet UIPickerView *pickerView;
    NSArray *pickerData;
     NSArray *pickerData2;
     NSArray *pickerData3;
        NSArray *pickerData4;
    BOOL geoloc;
    
    IBOutlet UIImageView *picture1;
    IBOutlet UIImageView *picture2;
    IBOutlet UIImageView *picture3;
    
    UIImagePickerController* imagePickerController;
    
    ViewOcupation *viewOcupation;
    
    NSString *selector;
}

@property BOOL geoloc;

@property (retain, nonatomic) IBOutlet UITextField *dormitorios_dobles;
@property (retain, nonatomic) IBOutlet UITextField *dormitorios_individuales;

@property (retain, nonatomic) NSString *selector;
@property (retain, nonatomic) IBOutlet UIPickerView *pickerView;
@property (retain, nonatomic) NSArray *pickerData;
@property (retain, nonatomic) NSArray *pickerData2;
@property (retain, nonatomic) NSArray *pickerData3;
@property (retain, nonatomic) NSArray *pickerData4;
@property (retain, nonatomic) IBOutlet UISwitch *geo;

@property (retain, nonatomic) IBOutlet UIImageView *picture1;
@property (retain, nonatomic) IBOutlet UIImageView *picture2;
@property (retain, nonatomic) IBOutlet UIImageView *picture3;

@property (retain, nonatomic) IBOutlet UIView *Mainview;

@property (retain, nonatomic) IBOutlet UITextField *currentAddress;
@property (retain, nonatomic) IBOutlet UITextField *currentCity;
@property (retain, nonatomic) IBOutlet UITextField *currentCountry;
@property (retain, nonatomic) IBOutlet UITextField *currentComunidad;
@property (retain, nonatomic) IBOutlet UITextField *codigoPostal;

@property (retain, nonatomic) IBOutlet MKMapView *mapView;
@property (strong, nonatomic) id detailItem;

@property (strong, nonatomic) IBOutlet UILabel *detailDescriptionLabel;

@property (strong, nonatomic) ViewOcupation *viewOcupation;

-(IBAction)switchValueChanged:(UISwitch *)sender;

-(IBAction) textFieldAdressEditing : (id) sender;
-(IBAction) textFieldCityEditing : (id) sender;
-(IBAction) textFieldCountryEditing : (id) sender;
-(IBAction) textFieldComunidadEditing : (id) sender;
-(IBAction) textFieldPostalEditing : (id) sender;
-(void)changePage:(int)numPage;
-(IBAction)pickImage:(id) sender;
-(IBAction)TakeImage:(UIButton *) sender;
-(IBAction)switchToTwo:(UIButton *)sender;
-(IBAction)switchToThree:(UIButton *)sender;
-(IBAction)switchToFour:(UIButton *)sender;
-(IBAction)switchToFive:(UIButton *)sender;
-(IBAction)FinalSlide:(UIButton *) sender;


@end
